Methods and systems for encoding pictures associated with video data

ABSTRACT

Several methods and systems for encoding pictures associated with video data are disclosed. In an embodiment, a method includes determining by a processing module, whether a picture is to be encoded based on at least one of a skip assessment associated with the picture and an encoding status of a pre-selected number of pictures preceding the picture in an encoding sequence. The method further includes encoding by the processing module, a plurality of rows of video data associated with the picture upon determining that the picture is to be encoded, wherein the plurality of rows are encoded based on a pre-selected maximum encoded picture size.

CROSS REFERENCE TO RELATED APPLICATIONS

This application claims the benefit of provisional patent applicationnumber 3451/CHE/2011, filed on Oct. 5, 2011, in the Indian PatentOffice, which is incorporated herein by reference in its entirety.

TECHNICAL FIELD

The present disclosure generally relates to the field of encoding ofvideo data.

BACKGROUND

Applications with strict real-time requirements, such as videoconferencing and gaming specify an acceptable latency (for example, 100milliseconds to 300 milliseconds) for a video encoder. Pursuant to anexemplary scenario, a video rate control (RC) mechanism of the videoencoder may utilize a hypothetical model of a decoder, such as videobuffer verifier (VBV), specified by video compression standards, such asMoving Pictures Expert Group (MPEG)-4 and InternationalTelecommunication Union Standardization Sector (ITU-T), to achieve anadherence to the latency specifications. The RC mechanism may beconfigured to skip encoding of pictures corresponding to the video dataupon an occupancy of the VBV approaching fullness during encoding. Thepictures may be skipped during encoding until the occupancy of the VBVreduces below a maximum allowable occupancy, so as to ensure adherenceto the latency specification. Pursuant to an exemplary scenario, inorder to reduce the number of pictures skipped during encoding, a limitis placed on a maximum size of encoded picture. However, such a limitmay affect a picture quality when a picture prediction is not effectiveand a residual energy is large.

SUMMARY

This Summary is provided to comply with 37 C.F.R. §1.73, requiring asummary of the invention briefly indicating the nature and substance ofthe invention. It is submitted with the understanding that it will notbe used to interpret or limit the scope or meaning of the claims.

Various systems, methods, and computer-readable mediums for encodingpictures associated with a video data are disclosed. In an embodiment, amethod includes determining by a processing module, whether a picture isto be encoded based on at least one of a skip assessment associated withthe picture and an encoding status of a pre-selected number of picturespreceding the picture in an encoding sequence. The method furtherincludes encoding by the processing module, a plurality of rows of videodata associated with the picture upon determining that the picture is tobe encoded. In one embodiment, the plurality of rows are encoded basedon a pre-selected maximum encoded picture size. In an embodiment, anumber of bits associated with the pre-selected maximum encoded picturesize is configured to be a value from among a plurality of valuesranging from 15 times an average number of bits associated with encodedpictures in the encoding sequence to 45 times the average number ofbits.

In an embodiment, determining whether the picture is to be encodedcomprises determining a number of encoded pictures in a set of picturescomprising the picture and the pre-selected number of pictures. Thepicture is determined to be encoded if the number of encoded pictures inthe set of pictures is less than a pre-determined number. In anembodiment, the picture is determined to be skipped from encoding if theskip assessment associated with the picture is positive and if thenumber of encoded pictures in the set of pictures is greater than orequal to the pre-determined number. In an embodiment, a subsequentpicture in the encoding sequence is selected for determination ofwhether to be encoded upon one of the encoding of the plurality of rowsof video data associated with the picture and the determination ofskipping of encoding of the picture.

In an embodiment, encoding the plurality of rows of video data comprisestracking a number of bits consumed during encoding each row of videodata from among the plurality of rows of video data. A quantizationscale is dynamically adjusted for encoding one or more remaining rows ofvideo data from among the plurality of rows of video data if a number ofbits associated with the maximum encoded picture size is likely to beexceeded during encoding of the one or more remaining rows of videodata. The one or more remaining rows of video data are then encodedbased on the adjusted quantization scale. In an embodiment, thequantization scale is adjusted based on a weighted average of productsof bits and quantization scales associated with one or more rows ofvideo data previously encoded from among the plurality of rows of videodata.

Additionally, in an embodiment, a system for encoding picturesassociated with video data is provided. In an embodiment, the systemincludes a processing module and a memory module. The processing moduleis configured to determine whether a picture is to be encoded based onat least one of a skip assessment associated with the picture and anencoding status of a pre-selected number of pictures preceding thepicture in an encoding sequence. The processing module is furtherconfigured to encode a plurality of rows of video data associated withthe picture upon determining that the picture is to be encoded, whereinthe plurality of rows are encoded based on a pre-selected maximumencoded picture size. The memory module is communicatively associatedwith the processing module and comprises a hypothetical bufferconfigured to store one or more encoded pictures from among the picturesin the encoding sequence.

Moreover, in an embodiment, a non-transitory computer-readable medium isprovided. The non-transitory computer-readable medium is configured tostore a set of instructions that when executed cause a computer toperform a method for encoding pictures associated with video data. Themethod includes determining, whether a picture is to be encoded based onat least one of a skip assessment associated with the picture and anencoding status of a pre-selected number of pictures preceding thepicture in an encoding sequence. The method further includes encoding aplurality of rows of video data associated with the picture upondetermining that the picture is to be encoded. In one embodiment, theplurality of rows are encoded based on a pre-selected maximum encodedpicture size. In an embodiment, a number of bits associated with thepre-selected maximum encoded picture size is configured to be a valuefrom among a plurality of values ranging from 15 times an average numberof bits associated with encoded pictures in the encoding sequence to 45times the average number of bits.

Other aspects and example embodiments are provided in the drawings andthe detailed description that follows.

BRIEF DESCRIPTION OF THE FIGURES

FIG. 1 illustrates a simplified overview of encoding of video data, inaccordance with an exemplary scenario;

FIG. 2 is a block diagram of an exemplary system for encoding ofpictures associated with video data, in accordance with an embodiment;

FIG. 3 depicts exemplary scenarios for determining whether a picture isto be encoded, in accordance with an embodiment;

FIG. 4 illustrates an exemplary computation of a weighted average basedon a triangular function for adjusting a quantization scale for encodingone or more remaining rows of video data, in accordance with anembodiment;

FIGS. 5A-5C depict an exemplary scenario illustrating a reduction invideo pulsing on encoding a plurality of rows of video data based on apre-selected maximum encoded picture size, in accordance with anembodiment;

FIGS. 6A-6B depict an exemplary scenario illustrating a reduction invideo jerkiness upon encoding of pictures corresponding to video data asexplained with reference to system of FIG. 2, in accordance with anembodiment;

FIG. 7 is a flow diagram of a method for encoding pictures associatedwith video data, in accordance with an embodiment;

FIGS. 8A-8B collectively depict a flow diagram of a method for encodingpictures associated with video data, in accordance with anotherembodiment; and

FIG. 9 is a block diagram of an integrated circuit for encoding picturesassociated with video data, in accordance with an embodiment.

DETAILED DESCRIPTION

Pursuant to an exemplary scenario, a video rate control (RC) mechanismof the video encoder may utilize a hypothetical model of a decoder, suchas video buffer verifier (VBV), specified by video compressionstandards, such as Moving Pictures Expert Group (MPEG)-4 and/orInternational Telecommunication Union Standardization Sector (ITU-T), toachieve an adherence to the latency specifications. The RC mechanism maybe configured to skip encoding of pictures corresponding to the videodata upon an occupancy of the VBV approaching fullness during encoding.The pictures may be skipped during encoding until the occupancy reducesbelow a maximum allowable occupancy, so as ensure adherence to thelatency specification. Pursuant to an exemplary scenario, in order toreduce the number of pictures skipped during encoding, a limit is placedon a maximum size of encoded picture. However, such a limit may affect apicture quality when a picture prediction is not effective and aresidual energy is large. Various embodiments of the present technology,however, provide methods and systems for encoding of pictures associatedwith video data that are capable of overcoming these and other obstaclesand providing additional benefits.

The following description and accompanying figures demonstrate that thepresent technology may be practiced, or otherwise implemented, in avariety of different embodiments. It should be noted, however, that thescope of the present technology is not limited to any or all of theembodiments disclosed herein. Indeed, one or more of the devices,features, operations, processes, characteristics, or other qualities ofa disclosed embodiment may be removed, replaced, supplemented, orchanged.

FIG. 1 illustrates a simplified overview of encoding of video data 102,in accordance with an exemplary scenario. In particular, FIG. 1illustrates a simplified overview of an encoding process flow 100 forencoding video data 102. Pursuant to an exemplary scenario, a videoencoder may perform the encoding process flow 100 to achieve thecompression of the video data 102. The video data 102 may be compressedso as to efficiently utilize a storage capacity during storage or aspectrum/bandwidth during transmission.

The video encoder may be configured within a multimedia system. Examplesof the multimedia system may include, but are not limited to, (1)multimedia devices, such as cellular phones, digital video cameras anddigital camcorders; (2) data processing devices, such as personalcomputers, laptops and personal digital assistants; and (3) consumerelectronics, such as set top boxes, digital video disk (DVD) players andvideo network servers. Pursuant to an exemplary scenario, the videoencoder may be any machine capable of executing a set of instructions(sequential and/or otherwise) so as to perform an encoding of video data102.

The video data 102 may be received by the video encoder from a mediacapture device. Examples of the media capture device may include a videocamera or a camcorder. The media capture device may be, for example, astand-alone device or a part of a mobile device, such as a Smartphone,or a data processing device, such as a personal computer, a laptopdevice or a personal digital assistant (PDA). The video data 102 mayalso be received by the video encoder from a transcoding system(implemented in any of hardware, software or firmware), which may bestand-alone device or a part of media capture device. Examples of videodata 102 may include, for example, image data, graphical data, textualdata or any combination thereof.

Pursuant to an exemplary scenario, the video data 102 may include aplurality of pictures, and each picture of the plurality of pictures mayinclude rows of video data 102. Each row of video data 102 may includeseveral blocks of data (for example, macroblocks, largest coding units,and the like). At 104 of the encoding process flow 100, a prediction foreach block from among a number of blocks is determined and subtractedfrom each block to form a residual video data. The prediction for eachblock of video data 102 may be performed based on previously encodedblocks of video data 102, either from current picture (e.g., intraprediction) or from other pictures that have already been encoded andtransmitted (e.g., inter prediction). Identifying a suitable predictionmay be referred to as motion estimation and subtracting the predictedblocks from the current block may be referred to as motion compensation.

After prediction and subtraction, at 106, the residual video data istransformed and quantized. The transformation of the residual video dataoutputs a set of transform coefficients, each of which is a weightingvalue for a standard basis pattern. The weighted basis patterns, whencombined, are capable of re-creating the residual video data. The set oftransform coefficients are then quantized (such as where eachcoefficient is scaled corresponding to a scale-down factor which may bea mathematical reciprocal of the scale-up factor specified by amultimedia standard, effectively setting a number of transformcoefficients to a small value (including zero value)) to achievecompression.

The quantized transform coefficients, along with certain information(for example, information such as: information about the structure ofcompressed data, information about a complete sequence of video data 102and/or information that enables a decoder to re-create the prediction),are subject to entropy encoding (e.g., conversion into binary codesusing variable length coding and/or arithmetic coding) at 108. Theentropy encoding of the quantized transform coefficients produces anefficient, compact binary representation of the information in the formof encoded video data 110. The encoded video data 110 may then be storedand/or transmitted.

Pursuant to an exemplary scenario, several applications involvingencoding of video data, such as video data 102, may be associated with alatency specification. Pursuant to an exemplary scenario, latency may bean expression of delay measured in units of time, and, may be equivalentto an amount of time involved from encoding of a video data in a videoencoder to its subsequent decoding at the decoder. Severallatency-sensitive video applications involve an extremely small value oflatency, for example of the order of a few milliseconds (ms). Videoapplications, such as television broadcast, video-on-demand, videoplayback, and the like may not involve real-time interaction and thelatency between the source of video data and the decoded video data maybe extended to several seconds. In video applications involvingreal-time interaction and a closed feed-back loop, such as videoconference, video phone, gaming, and the like, the latency determines anextent of stability of the video applications and may be maintained atlow values such as, for example, of the order of 33 ms.

Pursuant to an exemplary scenario, a video rate control (RC) mechanismof the video encoder may utilize a hypothetical model of a decoder toachieve an adherence to the latency specification. The hypotheticalmodel of a decoder may be considered to be conceptually connected to theoutput of an encoding system and may be configured to receive a streamcorresponding to the encoded video data, such as the encoded video data110. Such a hypothetical model of a decoder is known as the hypotheticalreference decoder (HRD) in H.263, H.264, and High Efficiency VideoCoding (HEVC) and the video buffering verifier (VBV) in MPEG, and ITU-T.The hypothetical model of a decoder and buffering verifier arehereinafter collectively referred to as hypothetical buffer. Thehypothetical buffer specifies rules that bit streams generated by anencoder must adhere to, for such an encoder to be considered conformantunder a given standard or recommendation. A bit stream may be consideredto be in compliance with the rules if the bit stream can be decoded bythe hypothetical buffer without suffering from buffer overflow or bufferunderflow. The hypothetical buffer parameters may be used to imposeconstraints on the encoded sizes of pictures and to assist in decidingthe required buffer sizes and start-up delay.

The RC mechanism may be configured to skip encoding of picturescorresponding to the video data 102 upon an occupancy of thehypothetical buffer approaching fullness during encoding. The picturesmay be skipped during encoding until the occupancy reduces below amaximum allowable occupancy, so as ensure adherence to the latencyspecification. In the case of pictures that consume a large number ofbits on being encoded, such as intra coded pictures (I-pictures), anoccupancy of the hypothetical buffer increases significantly and severalsubsequent pictures associated with the video data 102 may be skipped.In order to reduce the number of pictures skipped during encoding, alimit may be imposed on a maximum encoded picture size, such that themaximum encoded picture size is large enough to accommodate scenariosinvolving large number of bits, such as for the I-pictures and such thatthe maximum encoded picture size is also maintained within the limit inorder to ensure that a number of consecutive pictures skipped during thevideo encoding is reduced.

In an exemplary scenario, owing to the limit on the maximum encodedpicture size, sufficient bits may not be available for encoding ofI-pictures leading to a large value of quantization scale being used forI-pictures. Pursuant to an exemplary scenario, the utilization of thelarge value of quantization scale may lead to video quality degradation.A periodic occurrence of I-pictures in a video data 102 may increase anextent of the video quality degradation and also results in occurrenceof one or more pulsing artifacts in the encoded video data 110. Theoccurrence of the pulsing artifacts in the encoded video data 110 may betermed as “video pulsing”. Video pulsing may refer to a visible periodictemporal discontinuity most noticeable in slow moving pictures.

As explained earlier, in order to meet the latency specifications, thevideo encoder may need to skip encoding of several consecutive picturesin the video data 102. Consequently, several consecutive pictures maynot be encoded in between two successive encoded pictures. Such anencoded video data on being displayed (after decoding), may showjerkiness with several portions of the video data 102 associated withmotion appearing to move in jerks instead of a smooth motion. Occurrenceof jerkiness in the video data 102 may be termed as “video jerkiness”,which may refer to severe perceptual distortion in the video data 102.

Additionally, in an exemplary scenario, the RC mechanism may include arow (or sub-picture) rate control (hereinafter referred to as row RC)that may be used to ensure that an encoded picture consumes less thanthe maximum encoded picture size. Pursuant to an exemplary scenario,upon the row RC detecting that a picture is consuming more than themaximum encoded picture size, the row RC may increase a quantizationscale corresponding to a row of video data 102 associated with thepicture to ensure that a subsequent row of the picture consumes lessbits. In some exemplary scenarios, a complexity of the video data 102may vary within the picture. For example, a top half of the picture maybe associated with a lower complexity while a bottom half of the picturemay be associated with a higher complexity. During encoding, the tophalf of the picture may not consume too many bits and the row RC may notincrease the quantization scale. However, when the video encoder beginsencoding the bottom half of the picture, a number of bits utilized maybecome significant and upon exceeding the maximum encoded picture sizethe row RC may increase the quantization scale. If the complexity of thebottom half of the picture is very high, then the quantization may beincreased several times causing a video quality of the bottom half ofthe picture to be lower than the top half of the picture. The differencein the video quality between the top half and the bottom half of thepicture may result in significant video quality variation within thepicture that may be cause an overall video quality degradation from anend user perspective.

It is noted that the video pulsing, the video jerkiness, and the videoquality degradation issues while being interlinked impose contradictoryrequirements on the video encoder. In order to minimize video pulsingand video quality degradation within the picture, it is desirable tohave a large maximum encoded picture size. However, having a largemaximum encoded picture size causes an increase in a number of picturesskipped during encoding causing video jerkiness. Various embodiments ofthe present technology, however, provide methods and systems involvingan integrated approach to mitigate the video pulsing, the videojerkiness, and the video quality degradation issues so as to improve aperceptual video quality. The present technology enables overcoming theabove mentioned and other obstacles while providing additional benefits.An exemplary system for encoding pictures associated with video data,such as video data 102, in accordance with the present technology isdescribed herein with reference to FIG. 2.

FIG. 2 is a block diagram of an exemplary system 200 for encodingpictures associated with video data, such as video data 102, inaccordance with an embodiment. The pictures may include, for example,frames, fields, and the like. Furthermore, the pictures may beassociated with various video content types, such as, for example,progressive video content, interlaced video content, and the like. In anembodiment, the system 200 is configured to be included within a videoencoder. Examples of the video encoder may include a H.264 basedencoder, HEVC based encoder, a MPEG-4 based encoder, and the like. In anexemplary embodiment, the system 200 may be configured within a personalcomputer (PC), a tablet PC, a personal digital assistant (PDA), a mobilecommunication device, a web appliance, a set-top box (STB), an embeddedsystem and/or any machine capable of executing a set of instructions(sequential and/or otherwise) so as to perform encoding of pictures.

In an embodiment, the system 200 includes a processing module 202 and amemory module 204. In an embodiment, the memory module 204 iscommunicatively associated with the processing module 202. In anembodiment, the processing module 202 and the memory module 204 areconfigured to communicate with each other via or through a bus 206.Examples of the bus 206 may include, but are not limited to, a data bus,an address bus, a control bus, and the like. The bus 206 may be, forexample, a serial bus, a bi-directional bus or a unidirectional bus.

In an embodiment, the processing module 202 may be embodied as amulti-core processor, a single core processor, or a combination of oneor more multi-core processors and one or more single core processors.For example, the processing module 202 may be embodied as one or more ofvarious processing devices, such as a coprocessor, a microprocessor, acontroller, a digital signal processor (DSP), processing circuitry withor without an accompanying DSP, or various other processing devicesincluding integrated circuits such as, for example, an applicationspecific integrated circuit (ASIC), a field programmable gate array(FPGA), a microcontroller unit (MCU), a hardware accelerator, aspecial-purpose computer chip, or the like. In an embodiment, theprocessing module 202 may be configured to execute hard-codedfunctionality. In an embodiment, the processing module 202 is embodiedas an executor of software instructions, wherein the instructions mayspecifically configure the processing module 202 to perform thealgorithms and/or operations described herein when the instructions areexecuted. The processing module 202 may include, among other things, aclock, an arithmetic logic unit (ALU) and logic gates configured tosupport an operation of the processing module 202. Examples of thememory module 204 may include, but are not limited to, a random accessmemory (RAM), a dual port RAM, a synchronous dynamic RAM (SDRAM), adouble data rate SDRAM (DDR SDRAM), and the like. In an embodiment, thememory module 204 is configured to comprise an encoder buffer and ahypothetical buffer, such as the hypothetical buffer explained withreference to FIG. 1, to store one or more encoded pictures from amongthe pictures in the encoding sequence.

In an embodiment, the processing module 202 is configured to determinewhether a picture is to be encoded based on at least one of a skipassessment associated with the picture and an encoding status of apre-selected number of pictures preceding the picture in an encodingsequence. In one embodiment, each picture in the encoding sequencecorresponding to the video data may undergo determination of whether theeach picture is to be encoded or skipped from encoding. In anembodiment, a RC mechanism may be configured to perform a skipassessment of each picture in the encoding sequence. In an embodiment,the RC mechanism may be embodied within the processing module 202 or maybe configured to be external and communicatively associated with theprocessing module 202.

In one embodiment, the skip assessment is determined based on apre-defined skip threshold and an occupancy of a hypothetical buffer,such as the hypothetical buffer explained in FIG. 1. In one embodiment,the skip assessment may be depicted in mathematical terms in equation(1) as:Picture Skip Assessment=f(Buffer_fullness, Skip threshold)  (1)Where picture skip assessment corresponds to a skip assessment outcomefor a picture, the buffer_fullness corresponds to an occupancy level(measured in terms of number of bits) of the hypothetical buffer andskip threshold corresponds to a pre-defined limit on the occupancy levelof the hypothetical buffer. The equation (1) implies that a skipassessment for each picture is a function of the occupancy level of thehypothetical buffer at a time instant of encoding of the picture and thepre-defined skip threshold. In an embodiment, the pre-defined skipthreshold corresponds to maximum allowable occupancy of the hypotheticalbuffer. In an embodiment, if the buffer_fullness is likely to be greaterthan or equal to the pre-defined skip threshold, then the skipassessment of the picture may be positive, implying that the picture maybe skipped from encoding. In an embodiment, if the buffer_fullness isnot likely to be greater than or equal to the pre-defined skipthreshold, then the skip assessment of the picture may be negative,implying that the picture need not be skipped from encoding (that is thepicture is assessed to be encoded). For example, if the pre-defined skipthreshold is 10000 bits implying that a maximum allowable occupancy ofthe hypothetical buffer without suffering from the buffer underflow orbuffer overflow is 10000 bits, and, if the occupancy of the hypotheticalbuffer is 9000 bits at a time of encoding of the picture and it islikely that the occupancy of the hypothetical buffer is likely to beexceeded during encoding of the picture, then a skip assessment of thepicture may be positive, implying a skipping of encoding of the picture.In an embodiment, such a skip assessment may be performed for eachpicture in the encoding sequence.

In one embodiment, the processing module 202, in addition to performingthe skip assessment, may determine the encoding status of a pre-selectednumber of pictures preceding the picture in an encoding sequence. In oneembodiment, the encoding status may be indicative of whether the picturewas encoded or skipped from encoding. In an embodiment, the processingmodule 202 is configured to define a set of pictures comprising thepicture and a pre-selected number of pictures. For example, if thepre-selected number of pictures is four, then the set of pictures may beconfigured to comprise a current picture (for example, a picture forwhich the encoding is being determined to be performed or not) and fourpictures preceding the current picture in the encoding sequence. In anembodiment, the pre-selected number of pictures may immediately precedethe picture for encoding in the encoding sequence. The processing module202 may be configured to determine a number of encoded pictures in theset of pictures comprising the current picture and the pre-selectednumber of pictures. In an embodiment, the current picture's encodingstatus may be accounted for determining the number of encoded picturesin the set of pictures.

In an embodiment, the current picture is determined to be encoded if thenumber of encoded pictures in the set of pictures is less than apre-determined number. In an embodiment, the pre-determined number maybe considered to correspond to a limit on a minimum number of encodedpictures required within each span of pictures in the encoding sequenceto prevent the occurrence of video jerkiness, explained with referenceto FIG. 1. For example, if the set of pictures include five pictures andthe pre-determined number is three, then it is implied that at leastthree pictures are required to be encoded for every five pictures in theencoding sequence to prevent the occurrence of video jerkiness. In anexample embodiment, if the number of encoded pictures from among thepre-selected number of pictures in the set of pictures is two and thepre-determined number is three, then the current picture is determinedto be encoded to render a number of encoded pictures in the set ofpictures to be at least equal to the minimum allowable number of encodedpictures in the set of pictures as suggested by the pre-determinednumber. However, if the number of encoded pictures from among thepre-selected number of pictures is three and the pre-determined numberis three, then the current picture can be skipped if a skip assessmentassociated with the current picture is positive. In an embodiment, theprocessing module 202 may be configured to override a skip assessment ofthe picture if the number of encoded pictures in the set of pictures isless than the pre-determined number. For example, if the skip assessmentassociated with the current picture is positive implying the currentpicture may be skipped from encoding, and, if the number of encodedpictures in the set of pictures is less than the pre-determined number,then the processing module 202 may override the skip assessment and maydetermine the current picture to be encoded.

In an embodiment, the processing module 202 is configured to determinethe current picture to be skipped from encoding if the skip assessmentassociated with the picture is positive and if the number of encodedpictures in the set of pictures is greater than or equal to thepre-determined number. For example, if in the set of five pictures, thenumber of encoded pictures is four and the pre-determined number isthree, then the current picture may be skipped from encoding if the skipassessment associated with the current picture implies skipping fromencoding. However, if the number of encoded pictures in the set ofpictures is greater than or equal to the pre-determined number and theskip assessment of the current picture is negative, then the currentpicture may not be skipped, i.e. the current picture may be determinedto be encoded. The determination of whether a picture from among theplurality of pictures associated with video data is to be encoded orskipped is further explained with reference to FIG. 3. In an embodiment,a subsequent picture in the encoding sequence is selected fordetermination of whether to be encoded upon one of the encoding of theplurality of rows of video data associated with the picture and thedetermination of skipping of encoding of the picture.

In an embodiment, the processing module 202 is configured to encode aplurality of rows of video data associated with the picture upondetermining that the picture is to be encoded. For example, if videodata corresponding to each picture is conceptually considered to definea substantially rectangular region, then the substantially rectangularregion may be divided into horizontal rows, with each row includingseveral blocks (for example, macroblocks) of video data. In anembodiment, the encoding of the picture may be performed in a rasterscan order beginning from the top row and moving from leftmost block tothe rightmost block and so on and so forth till the rightmost block ofthe bottom row. Accordingly, upon determining that the picture is to beencoded, the processing module 202 may be configured to encode theplurality of rows of video data associated with the picture.

In an embodiment, the plurality of rows may be encoded based on apre-selected maximum encoded picture size. As explained with referencewith FIG. 1, a limit may be placed on the maximum size of encodedpictures to preclude skipping of pictures on account of fullness ofhypothetical buffer. In an embodiment, a number of bits associated withthe pre-selected maximum encoded picture size is configured to be avalue from among a plurality of values ranging from 15 times an averagenumber of bits associated with encoded pictures in the encoding sequenceto 45 times the average number of bits. For example, if the video datais captured at the rate of ‘F’ pictures per second and ‘R’ bits persecond (bps), an average number of bits ‘T’ for each encoded videopicture may be equal to R/F. In an embodiment, the processing module 204is configured to select a value of the maximum encoded picture size fromamong the plurality of values ranging from 15*T to 45*T. In anembodiment, a choice of such a value may be used to mitigate theoccurrence of video pulsing explained with reference to FIG. 1.

In an embodiment, encoding the plurality of rows of video data comprisestracking a number of bits consumed during encoding each row of videodata from among the plurality of rows of video data. As described withreference to FIG. 1 during encoding the video data, a row RC mechanismensures that an encoded picture consumes less than the maximum encodedpicture size. However, if the rows of video data are consuming morenumber of bits during encoding (for example, on account of complexity)and if a number of bits associated with the maximum encoded picture sizeis likely to be exceeded during encoding of the one or more remainingrows of video data, then the processing module 202 is configured todynamically adjust a quantization scale for encoding one or moreremaining rows of video data from among the plurality of rows of videodata. In an embodiment, the processing module 202 is configured toencode the one or more remaining rows of video data based on theadjusted quantization scale.

In an embodiment, during encoding of a row of video data correspondingto the picture, if it is determined that the number of bits associatedwith the maximum encoded picture size is likely to be exceeded duringencoding of the one or more remaining rows of video data, the processingmodule 202 increases a quantization scale (Qs) associated with eitherthe corresponding row of the picture or Qs of the sub-picture as a wholeto ensure that the subsequent portion (e.g., a subsequent row) of thepicture consumes less bits. In an embodiment, the quantization scale isadjusted based on a weighted average of products of number of bits andquantization scales associated with one or more rows of video datapreviously encoded from among the plurality of rows of video data. In anembodiment, the weighted average may be implemented in such a mannerthat the rows immediately preceding the row of video data currentlybeing encoded may be assigned higher weightage. The higher weightage isassigned to the immediately preceding rows to provide a betterindication of the complexity of the row of video data currently beingencoded than that of the encoded rows of video data farther away fromthe row of video data currently being encoded. In an embodiment, theweighted average is computed based on a triangular weighing function. Inan embodiment, dynamically adjusting the quantization scale based on theweighted average value may mitigate occurrence of video qualitydegradation explained with reference to FIG. 1. The computation of theweighted average based on the triangular weighing function and theadjusting of the quantization scale is explained further with referenceto FIG. 4.

In an embodiment, the system 200 additionally includes components, suchas an input unit (e.g., an image processing device), a video displayunit (e.g., liquid crystals display (LCD), a cathode ray tube (CRT), andthe like), a cursor control device (e.g., a mouse), a drive unit (e.g.,a disk drive), a signal generation unit (e.g., a speaker) and/or anetwork interface unit. The input unit is configured to transfer thevideo data to the processing module 202 for processing of the videodata. The drive unit includes a machine-readable medium upon which isstored one or more sets of instructions (e.g., software) embodying oneor more of the methodologies and/or functions described herein. In anembodiment, the software resides, either completely or partially, withinthe memory module 204 and/or within the processing module 202 during theexecution thereof by the system 200, such that the memory module 204 andprocessing module 202 also constitute a machine-readable media. Thesoftware may further be transmitted and/or received over a network viathe network interface unit.

The term “machine-readable medium” may be construed to include a singlemedium and/or multiple media (e.g., a centralized and/or distributeddatabase, and/or associated caches and servers) that store the one ormore sets of instructions. Moreover, the term “machine-readable medium”may be construed to include any medium that is capable of storing,encoding and/or carrying a set of instructions for execution by thesystem 200 and that cause the system 200 to perform any one or more ofthe methodologies of the various embodiments. Furthermore, the term“machine-readable medium” may be construed to include, but shall not belimited to, solid-state memories, optical and magnetic media, andcarrier wave signals.

FIG. 3 depicts exemplary scenarios for determining whether a picture isto be encoded, in accordance with an embodiment. Each picture from amonga plurality of pictures in an encoding sequence associated with videodata, such as the video data 102 of FIG. 1, may undergo such adetermination in an on-going manner. FIG. 3 depicts three instances,corresponding to three pictures in the encoding sequence, where it isdetermined whether the corresponding picture is to be encoded or skippedfrom encoding. Each of the three instances depict a portion of theencoding sequence including seven pictures, referred to by numerals 0,1, 2, 3, 4, 5 and 6 in boxes in FIG. 3, and referred to herein aspicture 0, picture 1, picture 2 and so on and so forth, respectively. Itis noted that that the seven pictures are depicted for illustrationpurposes and that similar determination for encoding may be performedfor each picture in the encoding sequence and may not be limited to thepictures depicted in FIG. 3.

In FIG. 3, at instance 302, it is determined whether picture 4 is to beencoded or skipped from encoding. Similarly, at instances 304 and 306,it is determined whether pictures 5 and 6 are to be encoded or not. Thedarkened/highlighted boxes in FIG. 3 represent pictures being skipped ornot ‘selected for encoding’ during previous instances. For example,picture 2 is determined to be skipped from encoding during an earlierinstance of determination performed corresponding to the picture 2. Asexplained with reference to FIG. 2, the processing module 202 isconfigured to determine whether a picture is to be encoded based on atleast one of a skip assessment associated with the picture and anencoding status of a pre-selected number of pictures preceding thepicture in an encoding sequence. The skip assessment for each picture inthe encoding sequence may be performed as explained with reference toFIG. 2.

At instance 302, a set of pictures is defined (for example, by theprocessing module 202 of FIG. 2) comprising the current picture forwhich determination of encoding is to be performed (for example, picture4) and a pre-selected number of pictures preceding the current picturein the encoding sequence. In an exemplary embodiment, the pre-selectednumber of pictures is chosen to be four. Accordingly, for the currentpicture 4, the pre-selected number of pictures preceding picture 4 inthe encoding sequence correspond to pictures 0, 1, 2 and 3. Accordingly,the set of pictures comprises pictures, 0, 1, 2, 3 and 4 and is depictedto be outlined by box 308. As explained with reference to FIG. 2, anumber of encoded pictures (including accounting for the determinationof the current picture's encoding status) is compared with apre-determined number. In an exemplary embodiment, the pre-determinednumber is chosen to be three. In the instance 302, only one picture(picture 2) is depicted to have an encoding status of ‘skipped fromencoding’. Accordingly, a number of encoded pictures from among thepre-selected number of pictures is three. Since the number of picturesin the set of pictures would be three (equal to the predeterminednumber) irrespective of the encoding decision on picture 4, the picture4 may be skipped if the skip assessment associated with the picture 4 ispositive, implying the picture 4 may be skipped.

For the next picture (for example, picture 5) in the encoding sequence,a similar determination on encoding may be performed depicted by theinstance 304. A set of pictures may be defined including the currentpicture 5 and pre-selected number of pictures preceding the picture 5 inencoding sequence. In an exemplary embodiment, the pre-selected numberis chosen to be four. Accordingly, pictures 1, 2, 3, 4 and 5 mayconfigure the set of pictures (depicted to be outlined by box 310). Anumber of encoded pictures from among the pre-selected number ofpictures is two, since pictures 2 and 4 were determined to be skippedfrom encoding. Accordingly, if the pre-determined number is chosen to bethree, then the number of encoded pictures in the set of pictures willbe less than the pre-determined number unless picture 5 is determined tobe encoded. Accordingly, picture 5 may be determined to be encoded,irrespective of the skip assessment associated with the picture 5.

For the next picture (for example, picture 6) in the encoding sequence,a similar determination on encoding may be performed, as depicted by theinstance 306. Pictures 2, 3, 4, 5 and 6 may configure the set ofpictures (depicted to be outlined by box 312) corresponding to thepre-selected number of pictures chosen to be 4. A number of encodedpictures from among the pre-selected number of pictures is two, sincepictures 2 and 4 were determined to be skipped from encoding.Accordingly, if the pre-determined number is chosen to be two, then thenumber of encoded pictures in the set of pictures will be equal to thepre-determined number. If the skip assessment associated with picture 6is negative, the picture 6 may not be skipped from encoding irrespectiveof the encoding decision on picture 6. Accordingly, in spite of thenumber of pictures in the set 312 being equal to the pre-determinednumber, the picture 6 is determined to be encoded.

In an embodiment, the pre-selected number of pictures for configuringthe set of pictures and the pre-determined number corresponding to aminimum required number of encoded pictures within each set may bepre-defined or may be dynamically modified depending upon situationalrequirements by the processing module 202. In an embodiment, configuringthe set of pictures, such as those depicted by boxes 308, 310 and 312may be enabled, using a sliding window concept, wherein a conceptualwindow may be slided over the pictures aligned in the encoding sequence,one picture at a time, to configure the set of pictures for each picturebeing encoded. In an embodiment, by performing determination of whetherthe picture is to be encoded or not in such a manner, an occurrence ofnumber of consecutive pictures being skipped may be precluded therebymitigating the occurrence of video jerkiness issue as outlined withreference to FIG. 1.

FIG. 4 illustrates an exemplary computation of a weighted average basedon a triangular function for adjusting a quantization scale for encodingone or more remaining rows of video data, in accordance with anembodiment. As explained with reference to FIG. 2, in an embodiment, thevideo data corresponding to a picture is encoded in a raster scan order,from top row to the bottom row and from leftmost macroblock to therightmost macroblock in each row. Further, a bit consumption isconstantly tracked during encoding rows of data and checked for alikelihood of exceeding a number of bits corresponding to a pre-selectedmaximum encoded picture size. In an embodiment, during encoding of a rowof video data corresponding to the picture, if it is determined that thenumber of bits associated with the pre-selected maximum encoded picturesize is likely to be exceeded during encoding of the one or moreremaining rows of video data, the processing module 202 increases aquantization scale (Qs) associated with either the corresponding row ofthe picture or Qs of the sub-picture as a whole to ensure that thesubsequent portion (e.g., a subsequent row) of the picture consumes lessbits. The quantization scale may be adjusted to a new value computedbased on a weighted average of products of number of bits andquantization scales associated with one or more rows of video datapreviously encoded from among the plurality of rows of video data. In anembodiment, the weighted average may be implemented in such a mannerthat the rows immediately preceding a row of video data currently beingencoded may be assigned higher weightage. The higher weightage may beassigned as the immediately preceding rows may provide a betterindication of the complexity of the row of video data currently beingencoded than that of the encoded rows of video data farther away fromthe row of video data currently being encoded. In an embodiment, theweighted average is computed based on the triangular weighing function.

The triangular weighing function may be configured to form a recursiveequation, such that a complexity required to derive the weighted averagevalue is low from one row of video data to a subsequent row of videodata. Further, the triangular weighted function may be configured in amanner that enables utilization of sufficient amount of data associatedwith a picture or a row of video data associated with the picture whilecomputing the weighted average. FIG. 4 depicts a triangle 400representative of the triangular weighing function. The points x₀,x_(i), and x_(n) marked on a base edge 402 of the triangle 400 representa product of a number of bits and a Qs value corresponding to 0^(th)row, i^(th) row, and n^(th) row respectively of the picture. The points404 and 406 marked on the hypotenuse 408 of the triangle 400 represent avalue of a variable i/n*x_(i) of the triangular function correspondingto the points x₁, and x_(n) respectively on the base edge 402, i being apositive integer with a value ranging from 0 to n corresponding to n+1rows of video data associated with the picture. In an embodiment,weighted average value W_(n) may be computed as provided in equation(2):

$\begin{matrix}{W_{n} = {\frac{1}{K}{\sum\limits_{i = {1:n}}{\frac{i}{n}x_{i}}}}} & (2)\end{matrix}$

Wherein x_(i) is the product of the number of bits and the value of Qscorresponding to i^(th) row, n is a positive integer representing anumber of rows associated with the picture and K is a factor configuredto ensure that an area of the triangle 400 is 1 to ensure that theweighted average value remains equal to 1 upon all x_(i) being 1. Onsubstituting W_(n)=1, x_(i)=1 in equation (2), the equation (3) may bededuced as:

$\begin{matrix}{1 = {{\frac{1}{K}{\sum\limits_{i = {1:n}}\frac{i}{n}}} = {{\frac{1}{K}*\frac{1}{n}*\frac{\left( {n*\left( {n + 1} \right)} \right)}{2}} = {\frac{1}{K}*\frac{\left( {n + 1} \right)}{2}}}}} & (3)\end{matrix}$

Based on equation (3) it may be deduced that K is equal to (n+1)/2.Further, by substituting the value of K in equation (2), followingequation (4) may be deduced:

$\begin{matrix}{W_{n} = {\frac{2}{n + 1}{\sum\limits_{i = {1:n}}{\frac{i}{n}x_{i}}}}} & (4)\end{matrix}$

In an embodiment, to derive a recursive equation, W_(n) may be expressedin terms of x_(n) and W_(n-1) to obtain the following equation (5):

$\begin{matrix}{W_{n} = {\frac{2}{n + 1}\left\lbrack {x_{n} + {\sum\limits_{i = {1:{n - 1}}}{\frac{i}{n}x_{i}}}} \right\rbrack}} & (5)\end{matrix}$

The equation (5) may be further refined to obtain the weighted averagefactor as provided in the following equation (6):

$\begin{matrix}{W_{n} = {\frac{2x_{n}}{n + 1} + {\frac{\left( {n - 1} \right)}{\left( {n + 1} \right)}W_{n - 1}}}} & (6)\end{matrix}$

Wherein, the initialization W₀ is assigned a zero value.

The weighted average factor W_(n) as obtained in equation (6) may beutilized for adjusting the value of the quantization scale for encodingthe one or more remaining rows of video data. The utilization of theweighted average factor for computing the adjusted quantization scale isexplained below.

Pursuant to an exemplary scenario, an average number of encoded bits “b”per macro block (MB) may be related to the quantization scale “Qs” asper equation (7) as follows:b=k/Qs  (7)

where, k is proportionality constant.

Upon expressing the average number of encoded bits “b” in terms of anumber of macroblocks encoded (MB_(enc)) at any given instant and anumber of bits utilized for the encoding the corresponding number ofmacroblocks in equation (7), the following equation (8) may be deduced:B _(enc) /MB _(enc) =k/Qs _(avg)  (8)

Wherein Qs_(avg) is an average quantization scale for the encoded MBs.

Using equation (8), an expected bit consumption (B_(expected)) forencoding the remaining MBs corresponding to the one or rows of videodata associated with the picture, using the average quantization scaleQs_(avg), is deduced in the following equation (9):B _(expected) =k/Qs _(avg)*(MB _(tot) −MB _(enc))  (9)

Wherein, MB_(tot) is a total number of MBs in the picture (for example,a total number of all the macroblocks in the plurality of rows of videodata associated with the picture). In an embodiment, by combiningequations (8) and (9), the following equation (10) may be deduced:B _(expected) =B _(enc) /MB _(end)*(MB _(tot) −MB _(enc))  (10)

The value of Qs for a subsequent row of MBs is increased upondetermining a value of B_(expected) to be greater than(B_(max)−B_(enc)), where B_(max) is a maximum encoded picture size (interms of bits). Further, by combining equation (10) and the equationB_(expected)>(B_(max)−B_(enc)) and re-arranging the terms, a conditionfor increasing the value of Qs for the subsequent row of MBs may bededuced as provided in equation (11):B _(enc)*(MB _(tot) −MB _(enc))>(B _(max) −B _(enc))*MB _(enc)  (11)

Upon the condition (11) being satisfied, it may be deduced that themaximum encoded picture size is likely to be exceeded and so the valueof Qs is increased for the remaining portion of the picture to ensurethat an expected bit consumption for the remaining MBs “B_(expected)_(—) _(new)” is less than B_(max)−B_(enc), where the value ofB_(expected) _(—) _(new) is computed based on equation (10) as:B _(expected) _(—) _(new) =k/Qs _(new)*(MB _(tot) −MB _(enc))  (12)

Therefore, to ensure that the bit consumption for the remaining MBs isnot likely to exceed the maximum encoded picture size, B_(expected) _(—)_(new) may comply to equation (13):B _(expected) _(—) _(new) ≦B _(max) −B _(enc)  (13)

From equations (12) and (13), the following equation (14) may bededuced:k/Qs _(new)*(MB _(tot) −MB _(enc))≦B _(max) −B _(enc)  (14)

After, re-arranging terms in equation (14), equation for Qs_(new) may beobtained in the equation (15) as:

$\begin{matrix}{{Qs}_{new} \geq {k*\frac{\left( {{MB}_{tot} - {MB}_{enc}} \right)}{\left( {B_{\max} - B_{enc}} \right)}}} & (15)\end{matrix}$

Substituting for k from equation (2), the following equation (16) may bededuced:

$\begin{matrix}{{Qs}_{new} \geq {{Qs}_{avg}*\frac{B_{enc}}{{MB}_{enc}}*\frac{\left( {{MB}_{tot} - {MB}_{enc}} \right)}{\left( {B_{\max} - B_{enc}} \right)}}} & (16)\end{matrix}$

The new value of quantization scale may accordingly be set to:

$\begin{matrix}{{Qs}_{new} = {{Qs}_{avg}*\frac{B_{enc}}{{MB}_{enc}}*\frac{\left( {{MB}_{tot} - {MB}_{enc}} \right)}{\left( {B_{\max} - B_{enc}} \right)}}} & (17)\end{matrix}$

In accordance with an embodiment, the product of Qs_(avg) and B_(enc) inequation (17) may be replaced with the weighted average n*Wncorresponding to n rows of the picture, for assigning higher weightageto immediately preceding rows, as the immediately preceding rows mayprovide a better indication of the complexity of the row of video datacurrently being encoded than that of the encoded rows of video datafarther away from the row of video data currently being encoded.Accordingly, the weighted average may be computed using the weightedaverage factor W_(n) from equation (6) to obtain the weighted averageas:

$\begin{matrix}{{n*W_{n}} = {n*\frac{2}{n + 1}{\sum\limits_{i = {1:n}}{\frac{i}{n}\left( {B_{i}*{Qs}_{i}} \right)}}}} & (18)\end{matrix}$

By replacing the product Qs_(avg)*B_(enc) in equation (17) with theweighted average in equation (18) the value of quantization scale is setto:

$\begin{matrix}{{Qs}_{new} = {n*W_{n}*\frac{1}{{MB}_{enc}}*\frac{\left( {{MB}_{tot} - {MB}_{enc}} \right)}{\left( {B_{\max} - B_{enc}} \right)}}} & (19)\end{matrix}$

In an embodiment, dynamically adjusting the quantization scale based onequation (19) may mitigate occurrence of video degradation explainedwith reference to FIG. 1. An exemplary scenario of reducing videopulsing based on the system 200 of the present technology is describedin FIGS. 5A, 5B and 5C.

FIGS. 5A-5C depict an exemplary scenario illustrating a reduction invideo pulsing on encoding a plurality of rows of video data based onpre-selected maximum encoded picture size, in accordance with anembodiment. More specifically, FIG. 5A depicts an exemplary picture 502corresponding to video data and FIG. 5B depicts an exemplary picture 504obtained on decoding the picture 502 subsequent to subjecting thepicture 502 to encoding while limiting a maximum encoded picture size toa low value (for example, a value between 4*T to 6*T, where ‘T’corresponds to an average number for bits utilized for encoded picturescorresponding to the video data). Occurrence of severe video qualitydegradation may be observed in a region 506 within the picture 504 ofFIG. 5B when compared to the picture 502 of FIG. 5A.

FIG. 5C depicts a picture 508 obtained on decoding the picture 502subsequent to encoding the picture 502 of FIG. 5A with the maximumencoded picture size associated with a value from among the plurality ofvalues ranging from 15*T to 45*T. In an embodiment, choosing such avalue for the maximum encoded picture size may mitigate of theoccurrence of video pulsing. For example, it may be observed that inFIG. 5B, a grass patch depicted in the region 506 is significantlydistorted, while a perceptible improvement in the grass area may beobserved in the corresponding region 510 of the picture 508 of FIG. 5C,indicating a significant perceptual video quality improvement andreduction in video pulsing on account of choosing a value for themaximum encoded picture size to be one among the plurality of valuesranging from 15*T to 45*T.

FIGS. 6A-6B depict an exemplary scenario illustrating a reduction invideo jerkiness upon encoding of pictures corresponding to video data asexplained with reference to system 200 of FIG. 2, in accordance with anembodiment. FIG. 6A illustrates a graph 600 depicting a reference indexof pictures corresponding to a video data plotted along X-axis 602, andthe corresponding number of bits consumed during encoding of thepictures plotted along Y-axis 604. FIG. 6A depicts an effect of a largevalue of maximum encoded picture size on subsequent pictures. It may beobserved from FIG. 6A that a picture 129 consumes 127080 bits causingencoding of the eight subsequent pictures, for example pictures 130 to137, to be skipped on account of exceeding an occupancy of ahypothetical buffer, causing severe video jerkiness when the encodedvideo data is subsequently decoded and displayed.

FIG. 6B illustrates a graph 606 depicting a reference index of picturescorresponding to the video data plotted along X-axis 608, and thecorresponding number of bits consumed during encoding the picturesplotted along Y-axis 610, the pictures being encoded as explained withreference to system 200 of FIG. 2. More specifically, a determination ofwhether a picture is to be encoded may be performed for each picture asexplained with reference to FIG. 2. It may be observed from FIG. 6B thatsubsequent to picture 129, encoding of only one picture, for examplepicture 130, is skipped, while the next four pictures (pictures 131-134)are encoded. It may be observed that the number and frequency of thepictures skipped during encoding is significantly reduced in thepictures of FIG. 6B when compared to the pictures of FIG. 6A indicatinga reduction in video jerkiness for the pictures of FIG. 6B encoded asexplained with reference to system 200 of the present technology. Amethod for encoding pictures associated with video data is explainedwith reference to FIG. 7.

FIG. 7 is a flow diagram of a method 700 for encoding picturesassociated with video data, in accordance with an embodiment. The method700 depicted in flow diagram may be executed by, for example, the system200 of FIG. 2. Operations of the flowchart, and combinations ofoperation in the flowchart, may be implemented by various means, such ashardware, firmware, processor, circuitry and/or other device associatedwith execution of software including one or more computer programinstructions. The operations of the method 700 are described with helpof the system 200. However, the operations of the method can bedescribed and/or practiced by using any other system. The method 700starts at operation 702.

At operation 702, it is determined by a processing module (for example,the processing module 202 of FIG. 2) whether a picture is to be encodedbased on at least one of a skip assessment associated with the pictureand an encoding status of a pre-selected number of pictures precedingthe picture in an encoding sequence. In one embodiment, each picture inthe encoding sequence corresponding to the video data may undergodetermination of whether the each picture is to be encoded or skippedfrom encoding.

In an embodiment, a video rate control (RC) mechanism may be configuredto perform a skip assessment of each picture in the encoding sequence.In one embodiment, the skip assessment is determined based on apre-defined skip threshold and an occupancy of a hypothetical buffer,such as the hypothetical buffer explained in FIG. 1, configured to storeencoded pictures from among the pictures in the encoding sequence. Asexplained with reference to equation (1), a skip assessment for eachpicture is a function of the occupancy level of the hypothetical bufferat a time instant of encoding of the picture and the pre-defined skipthreshold. In an embodiment, the pre-defined skip threshold correspondsto maximum allowable occupancy of the hypothetical buffer. In anembodiment, if the buffer_fullness is likely to be greater than or equalto the pre-defined skip threshold, then the skip assessment of thepicture may be positive, implying the picture may be skipped fromencoding. In an embodiment, if the buffer_fullness is not likely to begreater than or equal to the pre-defined skip threshold, then the skipassessment of the picture may be negative, implying the picture may benot be skipped from encoding (that is the picture is assessed to beencoded). The skip assessment associated with each video picture may beperformed as explained with reference to FIG. 2.

In one embodiment, in addition to performing the skip assessment, anencoding status of a pre-selected number of pictures preceding thepicture in an encoding sequence may be determined. In one embodiment,the encoding status may be indicative of whether the picture was encodedor skipped from encoding. In an embodiment, a set of pictures comprisingthe picture and the pre-selected number of pictures may be defined and anumber of encoded pictures in the set of pictures may be determined asexplained with reference to FIG. 3. In an embodiment, the currentpicture's encoding status may be accounted while determining the numberof encoded pictures in the set of pictures. The determination of whetherthe current picture is to be encoded based on the number of encodedpictures in the set of pictures and the skip assessment associated withthe current picture may be performed as explained with reference to FIG.3. In an embodiment, a subsequent picture in the encoding sequence isselected for determination of whether to be encoded upon one of theencoding of the plurality of rows of video data associated with thepicture and the determination of skipping of encoding of the picture.

At operation 704, a plurality of rows of video data associated with thepicture may be encoded by the processing module (for example, theprocessing module 202 of FIG. 2) upon determining that the picture is tobe encoded. In an embodiment, a plurality of rows may be encoded basedon a pre-selected maximum encoded picture size. As explained withreference with FIG. 1, a limit may be placed on the maximum size ofencoded pictures to preclude skipping of pictures on account of fullnessof hypothetical buffer. In an embodiment, a number of bits associatedwith the pre-selected maximum encoded picture size is configured to be avalue from among a plurality of values ranging from 15 times an averagenumber of bits associated with encoded pictures in the encoding sequenceto 45 times the average number of bits. For example, if the video datais captured at the rate of ‘F’ pictures per second and ‘R’ bits persecond (bps), an average number of bits ‘T’ for each encoded videopicture may be equal to R/F. In an embodiment, a value of the maximumencoded picture size may be selected to be a value from among theplurality of values ranging from 15*T to 45*T. In an embodiment, achoice of such a value may be used to mitigate the occurrence of videopulsing as illustrated with reference to FIGS. 5A-5C.

In an embodiment, during encoding the plurality of rows of video data, anumber of bits consumed during encoding each row of video data fromamong the plurality of rows of video data may be tracked (for example,by using the processing module 202 of FIG. 2). As described withreference to FIG. 1 during encoding the video data with a pre-selectedmaximum encoded picture size, a row RC mechanism ensures that an encodedpicture consumes less than the maximum encoded picture size. However, ifthe rows of video data are consuming more number of bits during encoding(for example, on account of complexity) and if a number of bitsassociated with the maximum encoded picture size is likely to beexceeded during encoding of the one or more remaining rows of videodata, then a quantization scale is dynamically adjusted for encoding oneor more remaining rows of video data from among the plurality of rows ofvideo data. In an embodiment, the quantization scale is adjusted basedon a weighted average of products of number of bits and quantizationscales associated with one or more rows of video data previously encodedfrom among the plurality of rows of video data. In an embodiment, theweighted average may be implemented in such a manner that theimmediately preceding rows to a row of video data currently beingencoded may be assigned higher weightage. The higher weightage may beassigned as the immediately preceding rows may provide a betterindication of the complexity of the row of video data currently beingencoded than that of the encoded rows of video data farther away fromthe row of video data currently being encoded. In an embodiment, theweighted average is computed based on a triangular weighing function asexplained with reference to FIG. 4. In an embodiment, the quantizationscale may be dynamically adjusted based on equation (19). In anembodiment, the one or more remaining rows of video data may be encoded(for example, by the processing module 202 of FIG. 2) based on theadjusted quantization scale. In an embodiment, dynamically adjusting thequantization scale based on the weighted average value may mitigateoccurrence of video quality degradation explained with reference to FIG.1.

FIGS. 8A-8B collectively depict a flow diagram of a method 800 forencoding pictures associated with video data, in accordance with anotherembodiment. The method 800 depicted in flow diagram may be executed by,for example, the system 200 of FIG. 2. Operations of the flowchart, andcombinations of operation in the flowchart, may be implemented byvarious means, such as hardware, firmware, processor, circuitry and/orother device associated with execution of software including one or morecomputer program instructions. The operations of the method 800 aredescribed with help of the system 200. However, the operations of themethod can be described and/or practiced by using any other system. Themethod 800 starts at operation 802.

At operation 802, a picture from among a plurality of pictures in anencoding sequence associated with video data is received. Examples ofvideo data 102 may include, for example, image data, graphical data,textual data or any combination thereof. In an embodiment, the picturecorresponding to the video data may be received from a media capturedevice, such as the media capture device explained with reference toFIG. 1. In an embodiment, the video data may be received from aplurality of remote media storage locations and/or memory location, suchas memory module 204.

At operation 804, a skip assessment associated with the picture isdetermined (for example, by using the processing module 202 of FIG. 2)to be positive or not. A positive skip assessment implies that thepicture may be skipped from encoding. A negative skip assessment impliesthat the picture may not be skipped from encoding. The skip assessmentmay be determined based on the pre-defined skip threshold and theoccupancy of the hypothetical buffer as explained with reference to FIG.2. On determining the skip assessment to be positive, operation 806 isperformed. Alternatively, on determining the skip assessment to benegative, operation 812 is performed. At operation 806, a number ofencoded pictures in a set of pictures comprising the picture and apre-selected number of pictures preceding the picture in the encodingsequence is determined. The number of encoded pictures is configured toaccount for an encoding status of the picture. Choosing of thepre-selected number of pictures, defining the set of pictures and thedetermination of the number of encoded pictures in the set of picturesmay be performed as explained with reference to FIG. 3.

At operation 808, the number is compared with a pre-determined number.As explained with reference to FIG. 2, the pre-determined number may beconsidered to correspond to a limit on a minimum number of encodedpictures required within each span of pictures in the encoding sequenceto prevent the occurrence of video jerkiness, explained with referenceto FIG. 1. If the number is greater than or equal to the pre-determinednumber then operation 810 is performed. If the number is less than thepre-determined number then operation 812 is performed.

At operation 810, it is determined that the picture may be skipped fromencoding. At operation 812, it is determined that the picture is to beencoded and an encoding of a plurality of rows of video datacorresponding to the picture may be initiated based on a pre-selectedmaximum encoded picture size. In an embodiment, a track of a number ofbits consumed during encoding each row of video data is maintained. Atoperation 814, it is checked whether a number of bits associated withthe maximum encoded picture size is likely to be exceeded duringencoding of the one or more remaining rows of video data.

In an embodiment, the one or more rows may be encoded based on apre-selected maximum encoded picture size. In an embodiment, a number ofbits associated with the pre-selected maximum encoded picture size isconfigured to be a value from among a plurality of values ranging from15 times an average number of bits associated with encoded pictures inthe encoding sequence to 45 times the average number of bits. In anembodiment, selecting a value of the maximum encoded picture size fromamong the plurality of values ranging from 15*T to 45*T, where Tcorresponds to the average number of bits associated with the encodedpictures. In an embodiment, a choice of such a value may be used tomitigate the occurrence of video pulsing explained with reference toFIGS. 5A-5C.

If it is determined that the number of bits associated with the maximumencoded picture size is likely to be exceeded during encoding the one ormore remaining rows of video data, then operation 816 is performed. At816, a quantization scale is dynamically adjusted for encoding one ormore remaining rows of video data based on a weighted average ofproducts of number of bits and quantization scales associated with oneor more rows of video data previously encoded from the among theplurality of rows of video data. The adjusting of the quantization scalemay be performed as explained with reference to FIG. 4. In anembodiment, the quantization scale may be adjusted based on equation(19).

At operation 818, the one or more remaining rows of video data areencoded based on adjusted/un-adjusted quantization scales. At operation820, it is checked whether all pictures in the encoding sequence areaccounted for, i.e. either one of encoded or skipped from encoding. Ifit is determined that all pictures are not accounted for, then operation822 is performed. If it is determined that all the pictures areaccounted for, then operation 824 is performed. At operation 822, asubsequent picture in the encoding sequence is selected and operations804-820 are repeated till all the pictures in the encoding sequence areaccounted for. If at operation 810, the picture is determined to beskipped from encoding, then the subsequent picture in the encodingsequence may be selected at 822 and operations 804-820 are repeated tillall the pictures in the encoding sequence are accounted for. Atoperation 824, the encoded pictures are one of stored or transmitted fordisplay. The method 800 ends at 824.

FIG. 9 is a block diagram of an integrated circuit 902 for encodingpictures associated with video data, in accordance with an embodiment.In an embodiment, the system 200 of FIG. 2 may be embodied at leastpartially in form of the integrated circuit 902. The integrated circuit902 comprises a transceiver module 904, a processing module 906, amemory module 908 and a display module 910. The transceiver module 904,the processing module 906, the memory module 908 and the display module910 are communicatively associated or coupled with each other using datapath 912. As such, it should be appreciated that at least some of thecomponents described below in connection with the integrated circuit 902may be optional and thus in an example embodiment the integrated circuit902 may include more, less or different components than those describedin connection with the example embodiment of FIG. 9. In an embodiment,the integrated circuit 902 may include only the processing module 906and the memory module 908.

The transceiver module 904 is communicatively associated or coupled witha plurality of multimedia resources 914 and is configured to receivepictures associated with video data from one or more multimediaresources from among the plurality of multimedia resources 914. Examplesof the multimedia resources may include, but are not limited to (1)remote multimedia systems (2) media capture devices, such as, forexample, a camera, camcorders and the like, and (3) multimedia storagedevices, such as, for example, magnetic tapes, disks, computer-readablemedia and the like. In an embodiment, the transceiver module 904 mayinclude an antenna and/or network connectors configured to coupled withor connect to wired networks (for example, local area networks (LANs))and wireless networks (for example, cellular networks), or a combinationthereof (for example, the Internet). Examples of network connectors mayinclude a universal serial bus (USB) interface, a wireless LANinterface, an infrared interface, an Ethernet port and the like.

The processing module 906 is configured to perform encoding of picturesassociated with the video data. In an embodiment, the processing module906 may be configured to encode the video data and provide the videodata to transceiver module 904 for transmission purposes or to memorymodule 908 for storage purposes. In an embodiment, the processing module906 may be substantially similar to processing module 202 of system 200of FIG. 2. The processing module 906 is configured to perform functionsas discussed in FIG. 2, which are not repeated herein for the sake ofbrevity.

The memory module 908 is configured to store the video data subsequentto encoding of the video data. In an embodiment, the memory module 908may be substantially similar to the memory module 204 of system 200 ofFIG. 2. The memory module 908 is configured to perform functions asdiscussed in FIG. 2, which are not repeated herein for the sake ofbrevity. Examples of memory module 908 may include, but are not limitedto, RAM, dual port RAM, SDRAM, DDR SDRAM, and the like. The displaymodule 910 is configured to facilitate a display of the video data ondisplay 916. The display 916 may be facilitated, for example, inresponse to a user input received using a user interface (not shown inFIG. 9). Examples of display 916 may include a light crystal display(LCD) panel, a plasma display panel, a field emission display and thelike.

In an embodiment the integrated circuit 902 may be an applicationprocessor chip. In an embodiment, the integrated circuit 902 may be apart of a particular or shared processor chip that is embedded within amultimedia system. Examples of the multimedia system may include, butare not limited to, (1) multimedia devices, such as, for example,cellular phones, digital video cameras and digital camcorders; (2) dataprocessing devices, such as, for example, personal computers, laptopsand personal digital assistants; and (3) consumer electronics, such as,for example, set top boxes, digital video disk (DVD) players and videonetwork servers.

Without in any way limiting the scope, interpretation, or application ofthe claims appearing below, advantages of one or more of the exemplaryembodiments disclosed herein include allowing utilization of a largemaximum encoded picture size (for example, of the order of 15*T to 45*T)for encoding pictures associated with the video data thereby enablingbetter quality of encoding of I-pictures and precluding occurrence ofquality degrading issues, such as video pulsing. Further, the presenttechnology suggests techniques for avoiding consecutive picture skipsduring encoding thereby precluding the occurrence of video jerkiness.Furthermore, the problems of video pulsing and video jerkiness arejointly addressed though they entail contradictory requirements therebyensuring an optimal trade-off between video pulsing and video jerkiness.Further, performing row rate control based on weighted average ofpreviously encoded rows improves picture quality significantly andprecludes degradation observed near select portions within the picture.

Although the present technology has been described with reference tospecific exemplary embodiments, it is noted that various modificationsand changes may be made to these embodiments without departing from thebroad spirit and scope of the present technology. For example, thevarious devices, modules, analyzers, generators, etc., described hereinmay be enabled and operated using hardware circuitry (for example,complementary metal oxide semiconductor (CMOS) based logic circuitry),firmware, software and/or any combination of hardware, firmware, and/orsoftware (for example, embodied in a machine-readable medium). Forexample, the various electrical structures and methods may be embodiedusing transistors, logic gates, and electrical circuits (for example,application specific integrated circuit (ASIC) circuitry and/or inDigital Signal Processor (DSP) circuitry).

Particularly, the system 200, the processing module 202 and the memorymodule 204 may be enabled using software and/or using transistors, logicgates, and electrical circuits (for example, integrated circuitcircuitry such as ASIC circuitry). Various embodiments of the presentdisclosure may include one or more computer programs stored or otherwiseembodied on a computer-readable medium, wherein the computer programsare configured to cause a processor or computer to perform one or moreoperations. A computer-readable medium storing, embodying, or encodedwith a computer program, or similar language, may be embodied as atangible data storage device storing one or more software programs thatare configured to cause a processor or computer to perform one or moreoperations. Such operations may be, for example, any of the steps oroperations described herein. Additionally, a tangible data storagedevice may be embodied as one or more volatile memory devices, one ormore non-volatile memory devices, and/or a combination of one or morevolatile memory devices and non-volatile memory devices.

Also, techniques, devices, subsystems and methods described andillustrated in the various embodiments as discrete or separate may becombined or integrated with other systems, modules, techniques, ormethods without departing from the scope of the present technology.Other items shown or discussed as directly coupled or communicating witheach other may be coupled through some interface or device, such thatthe items may no longer be considered directly coupled with each otherbut may still be indirectly coupled and in communication, whetherelectrically, mechanically, or otherwise, with one another. Otherexamples of changes, substitutions, and alterations ascertainable by oneskilled in the art, upon or subsequent to studying the exemplaryembodiments disclosed herein, may be made without departing from thespirit and scope of the present technology.

It should be noted that reference throughout this specification tofeatures, advantages, or similar language does not imply that all of thefeatures and advantages should be or are in any single embodiment.Rather, language referring to the features and advantages may beunderstood to mean that a specific feature, advantage, or characteristicdescribed in connection with an embodiment may be included in at leastone embodiment of the present technology. Thus, discussions of thefeatures and advantages, and similar language, throughout thisspecification may, but do not necessarily, refer to the same embodiment.

Various embodiments of the present disclosure, as discussed above, maybe practiced with steps and/or operations in a different order, and/orwith hardware elements in configurations which are different than thosewhich are disclosed. Therefore, although the technology has beendescribed based upon these exemplary embodiments, it is noted thatcertain modifications, variations, and alternative constructions may beapparent and well within the spirit and scope of the technology.Although various exemplary embodiments of the present technology aredescribed herein in a language specific to structural features and/ormethodological acts, the subject matter defined in the appended claimsis not necessarily limited to the specific features or acts describedabove. Rather, the specific features and acts described above aredisclosed as exemplary forms of implementing the claims.

What is claimed is:
 1. A method, comprising: determining by a processor,whether a picture is to be encoded based on at least one of a skipassessment associated with the picture and an encoding status of apre-selected number of pictures preceding the picture in an encodingsequence; and encoding by the processor, a plurality of rows of videodata associated with the picture upon determining that the picture is tobe encoded, wherein the plurality of rows are encoded based on apre-selected maximum encoded picture size, wherein a number of bitsassociated with the pre-selected maximum encoded picture size isconfigured to be a value from among a plurality of values ranging from15 times an average number of bits associated with encoded pictures inthe encoding sequence to 45 times the average number of bits.
 2. Themethod of claim 1, wherein the skip assessment is determined based on apre-defined skip threshold and an occupancy of a hypothetical bufferconfigured to store encoded pictures from among the pictures in theencoding sequence, and wherein the pre-defined skip thresholdcorresponds to maximum allowable occupancy of the hypothetical buffer.3. The method of claim 1, wherein determining whether the picture is tobe encoded comprises: determining a number of encoded pictures in a setof pictures comprising the picture and the pre-selected number ofpictures; encoding the picture if the number of encoded pictures in theset of pictures is less than a pre-determined number; and skippingencoding of the picture if the skip assessment associated with thepicture is positive and if the number of encoded pictures in the set ofpictures is greater than or equal to the pre-determined number.
 4. Themethod of claim 3, wherein a subsequent picture in the encoding sequenceis selected for determination of whether to be encoded upon one of theencoding of the plurality of rows of video data associated with thepicture and skipping the encoding of the picture.
 5. The method of claim1, wherein encoding the plurality of rows of video data comprises:tracking a number of bits consumed during encoding of each row of videodata from among the plurality of rows of video data; dynamicallyadjusting a quantization scale for encoding one or more remaining rowsof video data from among the plurality of rows of video data if a numberof bits associated with the maximum encoded picture size is likely to beexceeded during encoding of the one or more remaining rows of videodata; and encoding the one or more remaining rows of video data based onthe adjusted quantization scale.
 6. The method of claim 5, wherein thequantization scale is adjusted based on a weighted average of productsof numbers of bits and quantization scales associated with one or morerows of video data previously encoded from among the plurality of rowsof video data.
 7. The method of claim 6, wherein the weighted average iscomputed based on:$W_{n} = {\frac{2x_{n}}{n + 1} + {\frac{\left( {n - 1} \right)}{\left( {n + 1} \right)}W_{n - 1}}}$wherein, n is a row number of a row from among the plurality of rows ofvideo data, W_(n) is a weighted average computed for row ‘n’, x_(n)corresponds to a product of a number of bits and a quantization scalefor row ‘n’; W_(n-1) is a weighted average computed for row ‘n−1’, andW₀=0.
 8. The method of claim 7, wherein the quantization scale isadjusted based on:${Qs}_{new} = {n*W_{n}*\frac{1}{{MB}_{enc}}*\frac{\left( {{MB}_{tot} - {MB}_{enc}} \right)}{\left( {B_{\max} - B_{enc}} \right)}}$Wherein, Qs_(new) is the adjusted quantization scale, MB_(enc)corresponds to a number of macroblocks in encoded rows of video data,MB_(tot) corresponds to a total number of macroblocks in the pluralityof rows of video data, B_(max) corresponds to a number of bitsassociated with maximum encoded picture size, and B_(enc) corresponds toa number of bits associated with macroblocks in the encoded rows.
 9. Asystem, comprising: a processor configured to: determine whether apicture is to be encoded based on at least one of a skip assessmentassociated with the picture and an encoding status of a pre-selectednumber of pictures preceding the picture in an encoding sequence, andencode a plurality of rows of video data associated with the pictureupon determining that the picture is to be encoded, wherein theplurality of rows are encoded based on a pre-selected maximum encodedpicture size, wherein a number of bits associated with the pre-selectedmaximum encoded picture size is configured to be a value from among aplurality of values ranging from 15 times an average number of bitsassociated with encoded pictures in the encoding sequence to 45 timesthe average number of bits; and a memory module communicativelyassociated with the processor and comprising a hypothetical bufferconfigured to store one or more encoded pictures from among the picturesin the encoding sequence.
 10. The system of claim 9, wherein theprocessor is further configured to: determine a number of encodedpictures in a set of pictures comprising the picture and thepre-selected number of pictures; encode the picture if the number ofencoded pictures in the set of pictures is less than a pre-determinednumber; and skip encoding of the picture if the skip assessmentassociated with the picture is positive and if the number of encodedpictures in the set of pictures is greater than or equal to thepre-determined number, wherein a subsequent picture in the encodingsequence is selected for determination of whether to be encoded upon oneof the encoding of the plurality of rows of video data associated withthe picture and skipping the encoding of the picture.
 11. The system ofclaim 9, wherein the processor is further configured to: track a numberof bits consumed during encoding of each row of video data from amongthe plurality of rows of video data; dynamically adjust a quantizationscale for encoding one or more remaining rows of video data from amongthe plurality of rows of video data if a number of bits associated withthe maximum encoded picture size is likely to be exceeded duringencoding of the one or more remaining rows of video data; and encode theone or more remaining rows of video data based on the adjustedquantization scale.
 12. The system of claim 11, wherein the quantizationscale is adjusted based on a weighted average of products of numbers ofbits and quantization scales associated with one or more rows of videodata previously encoded from among the plurality of rows of video data.13. The system of claim 12, wherein the weighted average is computedbased on:$W_{n} = {\frac{2x_{n}}{n + 1} + {\frac{\left( {n - 1} \right)}{\left( {n + 1} \right)}W_{n - 1}}}$wherein, n is a row number of a row from among the plurality of rows ofvideo data, W_(n) is a weighted average computed for row ‘n’, x_(n)corresponds to a product of a number of bits and a quantization scalefor row ‘n’; W_(n-1) is a weighted average computed for row ‘n−1’, andW₀=0.
 14. The system of claim 13, wherein the quantization scale isadjusted based on:${Qs}_{new} = {n*W_{n}*\frac{1}{{MB}_{enc}}*\frac{\left( {{MB}_{tot} - {MB}_{enc}} \right)}{\left( {B_{\max} - B_{enc}} \right)}}$Wherein, Qs_(new) is the adjusted quantization scale, MB_(enc)corresponds to a number of macroblocks in encoded rows of video data,MB_(tot) corresponds to a total number of macroblocks in the pluralityof rows of video data, B_(max) corresponds to a number of bitsassociated with maximum encoded picture size, and B_(enc) corresponds toa number of bits associated with macroblocks in the encoded rows.
 15. Anon-transitory computer-readable medium comprising instructions thatwhen executed cause a computer to: determine whether a picture is to beencoded based on at least one of a skip assessment associated with thepicture and an encoding status of a pre-selected number of picturespreceding the picture in an encoding sequence; and encode a plurality ofrows of video data associated with the picture upon determining that thepicture is to be encoded, wherein the plurality of rows are encodedbased on a pre-selected maximum encoded picture size, wherein a numberof bits associated with the pre-selected maximum encoded picture size isconfigured to be a value from among a plurality of values ranging from15 times an average number of bits associated with encoded pictures inthe encoding sequence to 45 times the average number of bits.
 16. Thenon-transitory computer readable medium of claim 15, wherein theinstructions that cause the computer to determine whether the picture isto be encoded include instructions that cause the computer to: determinea number of encoded pictures in a set of pictures comprising the pictureand the pre-selected number of pictures; encode the picture if thenumber of encoded pictures in the set of pictures is less than apre-determined number; and skip encoding of the picture if the skipassessment associated with the picture is positive and if the number ofencoded pictures in the set of pictures is greater than or equal to thepre-determined number, wherein a subsequent picture in the encodingsequence is selected for determination of whether to be encoded upon oneof the encoding of the plurality of rows of video data associated withthe picture and skipping the encoding of the picture.
 17. Thenon-transitory computer readable medium of claim 15, wherein theinstructions that cause the computer to encode the plurality of rows ofvideo data include instructions that cause the computer to: track anumber of bits consumed during encoding of each row of video data fromamong the plurality of rows of video data; dynamically adjust aquantization scale for encoding one or more remaining rows of video datafrom among the plurality of rows of video data if a number of bitsassociated with the maximum encoded picture size is likely to beexceeded during encoding of the one or more remaining rows of videodata, wherein the quantization scale is adjusted based on a weightedaverage of products of numbers of bits and quantization scalesassociated with one or more rows of video data previously encoded fromthe among the plurality of rows of video data; and encode the one ormore remaining rows of video data based on the adjusted quantizationscale.